import React, {Component} from 'react';
require ('../Comment.css');

class Input extends Component {
  constructor () {
    super ();
  }
  handerNumChange (event) {
    if (this.props.onNumChange) {
      this.props.onNumChange (event.target.value);
    }
  }

  render () {
    return (
      <div className="comment-input">
        <div className="comment-field">
          <span className="comment-field-name">请输入数字：</span>
          <div className="comment-field-input">
            <input type='number' onChange={this.handerNumChange.bind (this)} />
          </div>
        </div>

      </div>
    );
  }
}

export default Input;
